package vsvm.classifier;

import java.io.Serializable;

import libsvm.svm_model;

import vsvm.data.model.AbstractDataModel;

public class TestingParameters implements Serializable {
	private static final long serialVersionUID = 100L;
	
	public static final int TEST_TRAINING_DATA = 1;
	public static final int TEST_SEPARATE_DATA = 2;
	public static final int TEST_CROSS_VALIDATION = 3;
	public static final int TEST_SPLIT_DATA = 4;
	
	
	private AbstractDataModel trainDataModel;
	private AbstractDataModel testDataModel;
	private int testType;
	private int folds;
	private int split;
	private boolean random;
	
	private svm_model trainedData = null;
	
	
	public TestingParameters(AbstractDataModel model) {
		setTrainDataModel(model);		
		testType = TEST_TRAINING_DATA;
	}
	
	public TestingParameters(AbstractDataModel model, AbstractDataModel testModel) {
		setTrainDataModel(model);
		setTestDataModel(testModel);
		testType = TEST_SEPARATE_DATA;
	}
	
	public TestingParameters(svm_model model, AbstractDataModel testModel) {
		setTrainDataModel(model);
		setTestDataModel(testModel);
		testType = TEST_SEPARATE_DATA;
	}
	
	public TestingParameters(AbstractDataModel model, int folds) {
		setTrainDataModel(model);
		setFolds(folds);
		testType = TEST_CROSS_VALIDATION;
	}
	
	public TestingParameters(AbstractDataModel model, int split, boolean random) {
		setTrainDataModel(model);
		setSplit(split);
		setRandom(random);		
		testType = TEST_SPLIT_DATA;
	}
	
	public int getFolds() {
		return folds;
	}
	public void setFolds(int folds) {
		this.folds = folds;
	}
	public boolean isRandom() {
		return random;
	}
	public void setRandom(boolean random) {
		this.random = random;
	}
	public int getSplit() {
		return split;
	}
	public void setSplit(int split) {
		this.split = split;
	}
	public AbstractDataModel getTestDataModel() {
		return testDataModel;
	}
	public void setTestDataModel(AbstractDataModel testDataModel) {
		this.testDataModel = testDataModel;
	}
	public int getTestType() {
		return testType;
	}
	public void setTestType(int testType) {
		this.testType = testType;
	}
	public AbstractDataModel getTrainDataModel() {
		return trainDataModel;
	}
	public svm_model getTrainedDataModel() {
		return trainedData;
	}
	
	public void setTrainDataModel(AbstractDataModel trainDataModel) {
		this.trainDataModel = trainDataModel;
	}
	
	public void setTrainDataModel(svm_model trainedDataModel) {
		this.trainedData = trainedDataModel;
	}
	
}
